Whenever the slice of a domU is set to 0, sedf_adjdom() sets extraweight
to 0. Later, in desched_extra_dom(), if the extrawight is not set, the
vcpu's score is calculated with this:
/*domain was running in L1 extraq => score is inverse of
utilization and is used somewhat incremental!*/
if ( !inf->extraweight )
/*NB: use fixed point arithmetic with 10 bits*/
inf->score[EXTRA_UTIL_Q] = (inf->period << 10) /
inf->slice;
Which can result in a divide by zero.
This changeset adds a comments and additional sanity check to prevent this
case from crashing Xen.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>